//
//  PywUserCenterModel.m
//  PywSdk
//
//  Created by smallwave on 16/8/11.
//  Copyright © 2016年 zero. All rights reserved.
//

#import "PywUserCenterModel.h"
#import "PywAppInfo.h"

@implementation PywUserCenterModel

+ (instancetype)userCenterWithDict:(NSDictionary *)dict{
    return [[self alloc] initWithDict:dict];
}

- (instancetype)initWithDict:(NSDictionary *)dict{
    self = [super init];
    if (self) {
        self.account = [NSString stringWithFormat:@"%@",dict[@"account"]];
        self.coupon_count = [NSString stringWithFormat:@"%@",dict[@"coupon_count"]];
        self.have_pay_pwd = [NSString stringWithFormat:@"%@",dict[@"have_pay_pwd"]];
        self.nickname = [NSString stringWithFormat:@"%@",dict[@"nickname"]];
        self.type = [NSString stringWithFormat:@"%@",dict[@"type"]];
        self.passport = [NSString stringWithFormat:@"%@",dict[@"passport"]];
        self.wap_credit_url = [NSString stringWithFormat:@"%@",dict[@"wap_credit_url"]];
        self.wap_set_paypwd_url = [NSString stringWithFormat:@"%@",dict[@"wap_set_paypwd_url"]];
        self.wap_forget_paypwd_url = [NSString stringWithFormat:@"%@",dict[@"wap_forget_paypwd_url"]];
        self.wap_modify_paypwd_url = [NSString stringWithFormat:@"%@",dict[@"wap_modify_paypwd_url"]];
        self.id_info = [dict objectForKey:@"id_info"];
        
        [PywAppInfo sharedAppInfo].is_applepay = [dict[@"is_applepay"] boolValue];
    }
    return self;
}

@end
